<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .item{
            display: flex;
        }
        .left img{
            width: 80px;
            height: 80px;
            border-radius: 50%;
            padding-left: 20px;
            margin-top: 10px;
        }
        #box{
            width: 600px;
            height: 700px;
            text-align: center;
            margin: auto;
            margin-top: 120px;
            background-color: rgb(248, 236, 236);
            /* border: 3px solid rgb(249, 160, 16); */
            border-radius: 30px;
        }
        .title{
            font-size: 30px;
            margin: 5px 5px;
        }
        .list .item{
            width: 580px;
            height: 100px;
            background-color: rgb(255, 255, 255);
            border-radius: 10px;
            margin: auto;
            margin-top: 30px;
            text-align: center;
            display: flex;
            justify-content: space-between;
        }
        button{
            width: 80px;
            height: 40px;
            background-color: rgb(233, 21, 21);
            margin-top: 30px;
            border-radius: 50px;
            border: 2px solid rgb(226, 140, 41);
            margin-right: 20px;
        }
        .main{
            margin-top: 15px;
            display: block;
        }
        .main a{
            text-decoration: none;
            color: rgb(202, 197, 197);
        }
        .main div{
            color: rgb(244, 27, 27);
        }
        .left{
            display: flex;
            text-align: left;
        }
    </style>
</head>
<body>
    <div id="box">
        <div class="title">热门单品</div>
        <div class="list">
            <div class="item"  v-for="(item,index) in tasklist" v-bind:key="index">
                <div class="left" >
                    <img v-bind:src="item.pic" alt="">
                
                <div class="main">
                    <h2>{{ item.name }}</h2>
                    <div>{{ item.desc }}</div>
                    <a href="">{{ item.tit }}</a>
                </div>
            </div>
                <div class="right">
                    <button>{{item.status==1?'立即兑':'已兑完'}}</button>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
<script src="./vue-2.5.21.js"></script>
<script>
    var v=new Vue({
        el:'#box',
        data:{
            tasklist:[
            {id:1,pic:"../day01-vue基础指令/pic.png",name:"脐橙3斤 快递到家",desc:"兑换后入手价8.9元",date:9.9,tit:"适用门店 >",status:1},
            {id:1,pic:"../day01-vue基础指令/pic.png",name:"耙耙柑2斤 快递到家",desc:"兑换后入手价9.9元",tit:"适用门店 >",status:2},
            {id:1,pic:"../day01-vue基础指令/pic.png",name:"水果捞350g",desc:"兑换后入手价6.9元",tit:"适用门店 >",status:2}
            ]
        },
    })
</script>